package com.quarters.bean;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Arrays;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 报修查询表
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-02
 */
@ApiModel(value="Inquiry对象", description="报修查询表")
public class Inquiry extends Model<Inquiry> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "报修用户")
    @TableField("userid")
    private Long  userid;

    @ApiModelProperty(value = "报修内容")
    @TableField("repair_content")
    private String repairContent;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime;

    @ApiModelProperty(value = "报修类型id")
    @TableField("repair_id")
    private Long repairId;

    @ApiModelProperty(value = "昵称")
    @TableField(exist = false)
    private byte[] nickName;

    @ApiModelProperty(value = "服务类型")
    @TableField(exist = false)
    private String repairName;

    @ApiModelProperty(value = "所在小区")
    @TableField(exist = false)
    private String quartersName;

    public String getRepairName() {
        return repairName;
    }

    public void setRepairName(String repairName) {
        this.repairName = repairName;
    }

    public String getQuartersName() {
        return quartersName;
    }

    public void setQuartersName(String quartersName) {
        this.quartersName = quartersName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getRepairId() {
        return repairId;
    }

    public void setRepairId(Long repairId) {
        this.repairId = repairId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }
    public String getNickName() {
        if(nickName==null){
            return null;
        }
        return new String(nickName);
    }

    public void setNickName(byte[] nickName) {
        this.nickName = nickName;
    }

    public String getRepairContent() {
        return repairContent;
    }

    public void setRepairContent(String repairContent) {
        this.repairContent = repairContent;
    }
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Inquiry{" +
                "id=" + id +
                ", userid=" + userid +
                ", repairContent='" + repairContent + '\'' +
                ", phone='" + phone + '\'' +
                ", createTime=" + createTime +
                ", repairId=" + repairId +
                ", nickName=" + Arrays.toString(nickName) +
                ", repairName='" + repairName + '\'' +
                ", quartersName='" + quartersName + '\'' +
                '}';
    }
}
